package com.project.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.RecordBean;
import com.project.service.IRecordService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

@RestController
@RequiresPermissions("record")
@RequestMapping("record")
public class RecordController {
    @Autowired
    private IRecordService recordService;
    @RequestMapping("findByItem")//动态分页查询日志
    public IPage<RecordBean> findByItem(Integer pageNO, LocalDate startDate, LocalDate endDate) {
        return recordService.findByItem(pageNO, startDate, endDate);
    }
}
